﻿@using Abp.Authorization.Users
@model Faker.Solution.Web.Models.Account.LoginFormViewModel
@{
    ViewBag.Title = L("LogIn");
}
@section scripts
{
    <environment names="Development">
        <script src="~/view-resources/Views/Account/Login.js" asp-append-version="true"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="~/view-resources/Views/Account/Login.min.js" asp-append-version="true"></script>
    </environment>
}
<h4 class="text-center">@L("LogIn")</h4>
<form id="LoginForm" asp-action="Login" method="post">
    <input type="hidden" name="returnUrl" value="@Model.ReturnUrl" />
    <input type="hidden" name="returnUrlHash" />
    <div class="input-group mb-3">
        <input type="text" name="usernameOrEmailAddress" class="form-control" placeholder="@L("UserNameOrEmail")" required autofocus maxlength="@AbpUserBase.MaxEmailAddressLength">
        <div class="input-group-append">
            <div class="input-group-text">
                <span class="fas fa-user"></span>
            </div>
        </div>
    </div>
    <div class="input-group mb-3">
        <input type="password" class="form-control" name="Password" autocomplete="password" placeholder="@L("Password")" required maxlength="@AbpUserBase.MaxPlainPasswordLength">
        <div class="input-group-append">
            <div class="input-group-text">
                <span class="fas fa-lock"></span>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-8">
            <div class="icheck-primary">
                <input type="checkbox" id="RememberMe" name="RememberMe" value="true">
                <label for="RememberMe">
                    @L("RememberMe")
                </label>
            </div>
        </div>
        <div class="col-4">
            <button type="submit" id="LoginButton" class="btn btn-primary btn-block btn-flat">@L("LogIn")</button>
        </div>
    </div>
</form>
@*<div class="social-auth-links text-center mb-3">
        <p>- OR -</p>
        <a href="javascript:;" class="btn btn-block btn-primary">
            <i class="fab fa-facebook mr-2"></i> Sign in using Facebook
        </a>
        <a href="javascript:;" class="btn btn-block btn-danger">
            <i class="fab fa-google-plus mr-2"></i> Sign in using Google+
        </a>
    </div>*@
<p class="mb-0">
    @if (Model.IsSelfRegistrationAllowed)
    {
        <div class="row">
            <div class="col-12">
                <a asp-action="Register" class="text-center"><i class="fa fa-plus-circle"></i> @L("Register")</a>
            </div>
        </div>
    }
</p>
